import request from '@/utils/request'

// 获取用户亲社会行为统计
export function getUserStats() {
  return request({
    url: '/credit/prosocial/userStats',
    method: 'get'
  })
}

// 获取回收站点列表
export function getRecycleStations(query) {
  return request({
    url: '/credit/prosocial/recycle/stations',
    method: 'get',
    params: query
  })
}

// // 修改回收站点
// export function changeRecycleStations(query) {
//   return request({
//     url: '/credit/prosocial/recycle/change_station',
//     method: 'get',
//     params: query
//   })
// }

// 获取回收记录
export function getRecycleRecords() {
  return request({
    url: '/credit/prosocial/recycle/records',
    method: 'get'
  })
}

// 提交回收记录
export function submitRecycle(data) {
  return request({
    url: '/credit/prosocial/recycle/submit',
    method: 'post',
    data: data
  })
}

// 获取水质监测站点
export function getWaterStations() {
  return request({
    url: '/credit/prosocial/water/stations',
    method: 'get'
  })
}

// 获取护水记录
export function getWaterRecords() {
  return request({
    url: '/credit/prosocial/water/records',
    method: 'get'
  })
}

// 获取公益记录
export function getCharityRecords() {
  return request({
    url: '/credit/prosocial/charity/records',
    method: 'get'
  })
}

// 获取公益等级信息
export function getCharityLevel() {
  return request({
    url: '/credit/prosocial/charity/level',
    method: 'get'
  })
}

// 获取护水活动列表
export function getWaterActivities(query) {
  return request({
    url: '/credit/prosocial/water/activities',
    method: 'get',
    params: query
  })
}

// 参与护水活动
export function joinWaterActivity(data) {
  return request({
    url: '/credit/prosocial/activities/join',
    method: 'post',
    data: data
  })
}

// 获取公益活动列表
export function getCharityActivities(query) {
  return request({
    url: '/credit/prosocial/charity/activities',
    method: 'get',
    params: query
  })
}

// 参与公益活动
export function joinCharityActivity(data) {
  return request({
    url: '/credit/prosocial/activities/join',
    method: 'post',
    data: data
  })
}

// 获取用户亲社会行为统计（无权限版本）
export function getProsocialStats() {
  return request({
    url: '/credit/prosocial/userStatsOpen',
    method: 'get'
  })
}

// 获取回收站点列表（无权限版本）
export function getRecycleStationsOpen(query) {
  return request({
    url: '/credit/prosocial/recycle/stationsOpen',
    method: 'get',
    params: query
  })
}

// 获取回收记录（无权限版本）
export function getRecycleRecordsOpen() {
  return request({
    url: '/credit/prosocial/recycle/recordsOpen',
    method: 'get'
  })
}

// 提交回收记录（无权限版本）
export function submitRecycleOpen(data) {
  return request({
    url: '/credit/prosocial/recycle/submitOpen',
    method: 'post',
    data: data
  })
}

// 获取护水活动列表（无权限版本）
export function getWaterActivitiesOpen(query) {
  return request({
    url: '/credit/prosocial/water/activitiesOpen',
    method: 'get',
    params: query
  })
}

// 获取公益活动列表（无权限版本）
export function getCharityActivitiesOpen(query) {
  return request({
    url: '/credit/prosocial/charity/activitiesOpen',
    method: 'get',
    params: query
  })
}

// 参与活动（无权限版本）
export function joinActivityOpen(data) {
  return request({
    url: '/credit/prosocial/activities/joinOpen',
    method: 'post',
    data: data
  })
}

// 获取回收统计
export function getRecycleStats() {
  return request({
    url: '/credit/prosocial/recycle/stats',
    method: 'get'
  })
}

// 获取附近回收站点
export function getNearbyRecycleStations(query) {
  return request({
    url: '/credit/prosocial/recycle/stationsOpen',
    method: 'get',
    params: query
  })
}

// 上报水质问题
export function reportWaterIssue(data) {
  return request({
    url: '/credit/prosocial/water/reportOpen',
    method: 'post',
    data: data
  })
}
